<?php
namespace app\controllers;

use Yii;
use yii\web\Controller;
use app\models\User;

class LoginController extends Controller
{
	public function actionIndex()
	{
		echo "Login-index";

		$data =[
			'user'=>'sdfsdf',
			'title'=>'学并思'
		];

		$user = Yii::$app->db->createCommand('SELECT * FROM fly_user')->queryAll();

		$rows = (new \yii\db\Query())
	    ->select(['user_id', 'email'])
	    ->from('fly_user')
	    ->limit(10)
	    ->all();


	    $user = User::findOne(2);


		var_dump($user);

		return $this->render('index',$data);
	}

	public function actionCheck()
	{
		var_dump($_GET['id']);
		echo "login-check";
	}
}
